#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
int main()
{
	double p1 = 1.0, p2 = 2.0;
	double sum = 0.0;
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		sum += p2 / p1;
		double temp = p2;
		p2 = p1 + p2;
		p1 = temp;
	}
	
	printf("%.4f\n", sum);
	cout << fixed << setprecision(4) << sum << endl;
	return 0;
}